import {Button} from 'antd'
import Pannel from '../../component/Pannel/Pannel'
import {useRouteLoaderData } from "react-router-dom";
import {Navigate} from "react-router";
import Login from "../Login/Login";
import Admin from "../../layout/Admin";
import AdminIndex from "../AdminIndex";
import ProductAdd from "./ProductAdd";
import AccountList from "../Account/AccountList";
import AccountAdd from "../Account/AccountAdd";
import EditPassWord from "../Account/EditPassWord";
import Page404 from "../Page404";  //自定义的组件

function ProductList(props){
    const data = useRouteLoaderData("product_list");
    // const match = useMatch("/admin/product_list")
    // console.log(data,match)

    return (
        <>
            <Pannel title="产品列表" extra={<Button>添加商品</Button>}>
                <p>Card content</p>
                <p>Card content</p>
                <p>Card content</p>
            </Pannel>

      
            {/* <ul>
                {list.map((v,k)=>{
                    return (
                        <li>
                            {v.path}
                            {v.children&&v.children.map((vv,kk)=>(<li>{vv.path}</li>))}
                        </li>
                    )
                })}
            </ul> */}
        </>
      

    )
}

export default ProductList;